package test

import "server/lib/Imartini"

// import "log"
// import "net/http"

var base = "test"
var route = [][]interface{}{
	{"test/index", "GET", "/", index},
	{"", "GET", "/1", test2},
	{"", "GET", "/1/:name", name},
	{"", "GET", "/132", index, test2},
	{"", "GET", "/api", api},
	{"", "GET", "/api2", api2},
	{"", "GET", "/redis", rtest},
	{"", "GET", "/getcookie", getcookie},
	{"", "GET", "/setcookie", setcookie},
	{"", "GET", "/getsession", getsession},
	{"", "GET", "/setsession", setsession},
	{"", "GET", "/delsession", delsession},
	{"", "GET", "/upload_image", upload_image},
	{"", "POST", "/upload_image", post_image},
}

func init() {
	Imartini.M.AddIroute(base, route)
	// Imartini.M.AddRoute("GET", "/js/", http.FileServer(http.Dir("/var/www/js/")))
	// log.Println(Imartini.M.Iroute)
}
